<template>
  <el-tabs v-model="activeName" @tab-click="handleClick">
    <el-tab-pane label="用户管理" name="ac"></el-tab-pane>
    <el-tab-pane label="配置管理" name="bc"></el-tab-pane>
    <keep-alive>
      <component :is="isComponent"></component>
    </keep-alive>
  </el-tabs>
</template>
<script>
let componentObj = {
  ac: () => import(/* webpackChunkName: "group-foo" */ "./a.vue"),
  bc: () => import(/* webpackChunkName: "group-foo" */ "./b.vue"),
};
export default {
  data() {
    return {
      activeName: "ac",
    };
  },
  computed: {
    isComponent() {
      return componentObj[this.activeName];
    },
  },
  methods: {
    handleClick(tab, event) {},
  },
};
</script>